home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-12-05 | 1.9 KB | 70 lines | [TEXT/KAHL] |
- /******************************************************************************
- CPathTable.c
-
-
- SUPERCLASS = CArrayPane
-
- Copyright © 1991 Symantec Corporation. All rights reserved.
-
-
- ******************************************************************************/
-
- #include "CPathTable.h"
- #include "CPathArray.h"
-
- /******************************************************************************
- IPathTable
- ******************************************************************************/
-
- void CPathTable::IPathTable( CView *anEnclosure, CBureaucrat *aSupervisor,
- short aWidth, short aHeight,
- short aHEncl, short aVEncl,
- SizingOption aHSizing, SizingOption aVSizing)
- {
- CArrayPane::IArrayPane( anEnclosure, aSupervisor, aWidth, aHeight,
- aHEncl, aVEncl, aHSizing, aVSizing);
-
- } /* CPathTable::IPathTable */
-
- /******************************************************************************
- GetCellText
- ******************************************************************************/
-
- void CPathTable::GetCellText( Cell aCell, short availableWidth, StringPtr itsText)
- {
- FSSpec thespec;
- ASSERT( member( itsArray, CPathArray));
-
- if (itsArray)
- {
- Str255 defpath;
- OSErr err;
- CInfoPBRec cPB;
- itsArray->GetItem( &thespec, aCell.v+1);
- cPB.dirInfo.ioDrParID = thespec.parID;
- defpath[0] = 0;
- do
- {
- Str255 tmp;
- BlockMove(defpath,tmp,1+*defpath);
- /* get information about dir */
- cPB.hFileInfo.ioCompletion = (ProcPtr)0L;
- cPB.hFileInfo.ioNamePtr = (StringPtr)defpath;
- cPB.hFileInfo.ioVRefNum = thespec.vRefNum;
- cPB.hFileInfo.ioFDirIndex = -1;
- cPB.hFileInfo.ioDirID = cPB.dirInfo.ioDrParID;
-
- err = PBGetCatInfoSync(&cPB);
- if (!err)
- {
- BlockMove(tmp, &defpath[1+*defpath], 1+*tmp);
- defpath[1+*defpath] = ':';
- defpath[0] += 1+*tmp;
- }
- }
- while (!err);
- BlockMove(defpath, itsText, 1+*defpath);
- }
-
- } /* CPathTable::GetCellText */
-